var str = "zero jsobj";
console.log(str.indexOf("o"));
console.log(str.lastIndexOf("o"));

var str2 = "    stop    is    dog   1";
console.log(str2.trim());
console.log(str2.trimLeft());
console.log(str2.trimRight());


var str3 = "A a b E f";
console.log(str3.toLowerCase());
console.log(str3.toUpperCase());

console.log(str3.toLocaleLowerCase());
console.log(str3.toLocaleUpperCase());



console.log(str.concat("11","22","33"));

console.log("--------------------------------");

var text = "cat,bat,sat,fat";
var pattern = /.at/;
var matches = text.match(pattern);
console.log(matches.index);
console.log(matches);
console.log(matches[0]);
console.log(matches[1]);


console.log("--------------------------------");
console.log(text.search(/at/));
console.log(text.search("bat"));


console.log("--------------------------------");
console.log(text.replace("at","od"));
console.log(text.replaceAll("at","in"));
console.log(text.replace(/at/g,'oo'));

var colorText = "red,blue,jack";
console.log(colorText.split(",",1));

console.log(text.localeCompare(colorText));

console.log(String.fromCharCode(65,66,67,68));

console.log(Math.sqrt(16));

console.log("--------------------------------");
console.log(window.colorText);


for(names in this){
    console.log(names);
    
}
